# coding:utf-8
'''
Sets are used to store multiple items in a single variable.
Set is one of 4 built-in data types in Python used to store collections of data,
the other 3 are List, Tuple, and Dictionary, all with different qualities and usage.
A set is a collection which is unordered, unchangeable*, and unindexed.
Once a set is created, you cannot change its items, but you can add new items
セット(集合)は、複数の項目を 1 つの変数に格納するために使用されます。
セットは、データのコレクションを格納するために使用される Python の 4 つの組み込みデータ型の 1 つです。
他の 3 つは、リスト、タプル、および辞書で、すべて異なる品質と使用法を持っています。
セットは、順序付けされておらず、変更できず、インデックス付けされていないコレクションです。
セットが作成されると、その項目を変更することはできませんが、新しい項目を追加することはできます。
'''
thisset = {"apple", "banana", "cherry"}
print(type(thisset))
print(thisset)
# Duplicate values will be ignored:
thisset = {"apple", "banana", "cherry", "apple"}
print(thisset)
for x in thisset:
print(x)
print("banana" in thisset)